import java.util.Scanner;

public class Fibonacci {
    public static int fib(int n) {
        if(n==1) {
            return 0;
        }
        if(n==2) {
            return 1;
        }
        int f1=0;
        int f2=1;
        int f3=888;
        for(int i =3;i<=n;i++) {
            f3=f1+f2;
            f1=f2;
            f2=f3;
        }
        return f3;
    }
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n = scanner.nextInt();
        System.out.println(fib(n));
    }
}
